<div id="${id}" name="${id}">
    <div style="display: flex;padding: 5px 0;border-bottom: 1px solid #00a6c9;color: #666a73">
        <span style="flex: 1;">操作诊所</span>
        <span style="flex: 1;">首次收费时间</span>
        <span style="flex: 0.5;">账单状态</span>
        <span style="flex: 1;">就诊时间</span>
        <span style="flex: 0.5;">医生</span>
        <span style="flex: 0.5;">应收</span>
        <span style="flex: 0.5;">实收</span>
        <span style="flex: 0.5;">欠费</span>
        <span style="flex: 1;">备注</span>
        <span style="flex: 1;">操作</span>
    </div>
    @for(item in list){
    <p style="display: none" value="${item.getTime}">${item.getTime}</p>
    <p style="display: none" value="${item.operationTime}">${item.operationTimeOne}</p>
    <p style="display: none" value="${item.operationTime}">${item.operationTimeTwo}</p>
    <div>
        <div style="display: flex;padding: 5px 0;border-bottom: 1px solid #e3e3e3;position: relative">
            <span style="flex: 1;">${item.outpatientName}</span>
            <span style="flex: 1;">${item.operationTime}</span>
            <span style="flex: 0.5;">${item.dealStatus}</span>
            <span style="flex: 1;">${item.operationTime}</span>
            <span style="flex: 0.5;">${item.doctor}</span>
            <span style="flex: 0.5;" >${item.totleFoldingPay}</span>
            <span style="flex: 0.5;" >${item.totleServiceActualPay}</span>
            <span style="flex: 0.5;" >${item.totleArrears}</span>
            <span style="flex: 1;">${item.remarks}</span>
            <span style="flex: 1;"><a href="javascript:;" style="color: #da6792;" onclick="updateDoctor('${item.operationTime},${item.getTime}')">修改</a></span>
            <div style="position: absolute;left: 25px;font-size: 17px;" class="showDetail">
                <span class="glyphicon glyphicon-collapse-down"></span>
                <span class="glyphicon glyphicon-collapse-up" style="display: none"></span>
            </div>
        </div>
        <div value="${item.operationTime}" style="padding: 12px 28px;overflow: hidden;display: none"></div>
    </div>
    <script>
        $.ajax({
            url: Feng.ctxPath + "/doctorLooked/getOpenBillListRecord",
            type: "post",
            data: {
                "operationTime": $("p[value='${item.operationTime}']").text(),
                "reservationsId": $("#reservationsId").val()
            },
            success: function (data) {
                var text = "";
                var totleFoldingPay = 0.00;
                var TotleServiceActualPay = 0.00;
                var accountArrears = 0.00;
                var accountArrears2 = 0.00;
                var bf = 0.00;
                text += '<div style="box-shadow: 0 0 8px #cccccc;border-radius: 5px;">' +
                    '<div style="display: flex;padding: 5px 0;background: #c5f7ff;color: #666a73">' +
                    '<span style="flex: 0.5;text-indent: 2rem;">操作诊所</span>' +
                    '<span style="flex: 1;">交易时间</span>' +
                    '<span style="flex: 0.5;">交易类型</span>' +
                    '<span style="flex: 0.5;">交易状态</span>' +
                    '<span style="flex: 0.5;">收费人</span>' +
                    '<span style="flex: 0.5;">医生</span>' +
                    '<span style="flex: 1;">收款项目</span>' +
                    '<span style="flex: 1;">收款金额</span>' +
                    '<span style="flex: 0.7;">开单备注</span>' +
                    '<span style="flex: 0.7;">结账备注</span>' +
                    '</div>';
                for (var i = 0; i < data.length; i++) {
                    text += '<div style="display: flex;padding: 5px 0;border-top: 1px solid #eeeeee;">' +
                        '<span style="flex: 0.5;text-indent: 2rem;">' + data[i].outpatientName + '</span>' +
                        '<span style="flex: 1;">' + data[i].getTime + '</span>' +
                        '<span style="flex: 0.5;">' + data[i].isDoName + '</span>' +
                        '<span style="flex: 0.5;">' + data[i].dealStatus + '</span>' +
                        '<span style="flex: 0.5;">' + data[i].rechargePeople + '</span>' +
                        '<span style="flex: 0.5;">' + data[i].doctor + '</span>' +
                        '<span style="flex: 1;">' + data[i].payServiceName + '</span>' +
                        '<span style="flex: 1;">' + data[i].serviceActualPay + '('+ data[i].checkoutMethod+')</span>' +
                        '<span style="flex: 0.7;">' + data[i].remarks + '</span>' +
                        '<span style="flex: 0.7;">' + data[i].remarkss + '</span>' +
                        '</div>';
                }
                text += '</div>';
                $("div[value='${item.operationTime}']").html(text)
            }
        })
        function updateDoctor(operationTime,getTime){//修改医生护士
            var reservationsId= $("#reservationsId").val();
            var cri=reservationsId+","+operationTime+","+getTime;
            var index = layer.open({
                type: 2,
                title: '修改医生/医助',
                area: ['70%', '70%'], //宽高
                fix: true, //不固定
                maxmin: true,
                content: Feng.ctxPath + '/consultant/to_updateDoctorOrNurse/' + cri
            });
        }
    </script>
    @}
</div>